<%@ taglib prefix="spring-tags" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="spring-form" uri="http://www.springframework.org/tags/form"%>
<%@ page
    import="org.jiscinvolve.astrodabis.barberry.control.Paths"
    import="org.jiscinvolve.astrodabis.barberry.control.ObjectData"
    import="org.jiscinvolve.astrodabis.barberry.control.RequestData"
    import="org.jiscinvolve.astrodabis.barberry.common.core.Tag"
    import="org.jiscinvolve.astrodabis.barberry.common.core.Account"
    import="org.jiscinvolve.astrodabis.barberry.common.data.TapService"
    import="org.jiscinvolve.astrodabis.barberry.common.data.TapTable"
    import="org.jiscinvolve.astrodabis.barberry.common.data.TapColumn"
    import="org.jiscinvolve.astrodabis.barberry.common.data.TapRow"
    import="org.jiscinvolve.astrodabis.barberry.common.data.TapJoin"
    import="org.jiscinvolve.astrodabis.barberry.common.data.RowTag"
    import="org.jiscinvolve.astrodabis.barberry.common.data.JoinTag"
    session="true"
%><%
ObjectData<JoinTag> data = (ObjectData<JoinTag>) request.getAttribute(
    RequestData.MODEL_ATTRIB
    ) ;
Account actor = data.actor();
JoinTag jointag = data.object();
%>
<html>
    <head>
	    <title>AstroDAbis join tag <%= jointag.ident() %></title>
        <link href='<%= data.file("css/page.css") %>' rel='stylesheet' type='text/css'/>
    </head>
    <body>
        <%@ include file="/jsp/header.jsp" %>
        <div class='body'>
            <div class='left'>
                <%@ include file="/jsp/menu.jsp" %>
            </div>
            <div class='right'>
                <a href='<%= data.link(jointag) %>'>
                    <img src='<%= data.qrcode(data.link(jointag)) %>'/>
                </a>
            </div>
            <div class='content'>
        	    <h2>Join tag <%= jointag.ident() %></h2>

                <fieldset>
                    <legend>Job</legend>
                    <div>
                        <ul>
                            <li>
                                Job : <a href='<%= data.link(jointag.job()) %>'><%= jointag.job().name() %></a>
                            </li>
                            <li>
                                Owner : <a href='<%= data.link(jointag.job().owner()) %>'><%= jointag.job().owner().name() %></a>
                            </li>
                        </ul>
                    </div>
                </fieldset>

                <fieldset>
                    <legend>Join</legend>
                    <div>
                        <ul>
                            <li>
                                Table : <a href='<%= data.link(jointag.join().one().parent().parent()) %>'><%= jointag.join().one().parent().parent().name() %></a>
                            </li>
                            <li>
                                Column : <a href='<%= data.link(jointag.join().one().parent()) %>'><%= jointag.join().one().parent().name() %></a>
                            </li>
                            <li>
                                Row : <a href='<%= data.link(jointag.join().one()) %>'><%= jointag.join().one().value() %></a>
                            </li>
                        </ul>

                        <ul>
                            <li>
                                Table : <a href='<%= data.link(jointag.join().two().parent().parent()) %>'><%= jointag.join().two().parent().parent().name() %></a>
                            </li>
                            <li>
                                Column : <a href='<%= data.link(jointag.join().two().parent()) %>'><%= jointag.join().two().parent().name() %></a>
                            </li>
                            <li>
                                Row : <a href='<%= data.link(jointag.join().two()) %>'><%= jointag.join().two().value() %></a>
                            </li>
                        </ul>

                    </div>
                </fieldset>

                <fieldset>
                    <legend>Tag</legend>
                    <div>
                        <ul>
                            <li>
                                Owner : <a href='<%= data.link(jointag.tag().owner()) %>'><%= jointag.tag().owner().name() %></a>
                            </li>
                            <li>
                                Tag : <a href='<%= data.link(jointag.tag()) %>'><%= jointag.tag().name() %></a>
                            </li>
                            <li>
                                Value : <%= jointag.value() %>
                            </li>
                        </ul>
                    </div>
                </fieldset>

            </div>
        </div>
        <%@ include file="/jsp/footer.jsp" %>
    </body>
</html>

